package src.entity;

public class Bullet {
    private int x;
    private int y;
    private int speed;
    private final int playerId;
    private boolean alive;

    public Bullet(int x, int y, int playerId) {
        this.x = x;
        this.y = y;
        this.playerId = playerId;
        this.speed = 20;
        this.alive = true;
    }

    public void move() {
        this.x += speed;
    }

    // Getters
    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public int getSpeed() {
        return speed;
    }

    public int getPlayerId() {
        return playerId;
    }

    public boolean isAlive() {
        return alive;
    }

    // Setters
    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public void setAlive(boolean alive) {
        this.alive = alive;
    }
}
